<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
	</head>
	<body>
		<h1>shisongyan</h1>
	</body>
	<script>
		const success = position => {
			document.write("位置获取成功："+position.coords)
			console.log("位置获取成功："+position.coords)
		}
		const error = positionError => {
			document.write("位置获取失败："+positionError.code,positionError.message)
			console.log("位置获取失败："+positionError.code,positionError.message)
		}
		const options = {
			
		}
		if(navigator.geolocation){
			navigator.geolocation.getCurrentPosition(success,error,options)
		}else{
			alert("您的浏览器不支持geolocation")
		}
	</script>
</html>
